<?php
    namespace Npfe\Model;
    use Think\Model;
    class PgModel extends Model {
        public function modiflypg($cn,$snid,$mod) {
            //自动更新环节列表模块
            switch ($mod) {
                case 'c':
                    $res = $this->where("gd_cn = '$cn' && pg_name = '更换手机'")->find();
                    $bz = "已换货成功，单号为".$snid;
                    if ($res != false) {
                        $data = array(
                            'bz' => $bz
                        );
                        $this->where("gd_cn = '$cn' && pg_name = '更换手机'")->save($data);
                    }
                    break;
                case 'v':
                    ;
                    break;
            };
        }

}